import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-10-28
 * Time: 20:11
 */
public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        int[] arr = new int[6];
        boolean[] flag = new boolean[t];
        for(int i = 0; i < t; i++) {
            for(int j = 0; j < 6; j++) {
                arr[j] = in.nextInt();
            }
            Arrays.sort(arr);
            if(arr[0] + arr[1] > arr[2] && arr[3] + arr[4] > arr[5]) {
                flag[i] = true;
            }
        }
        for(int i = 0; i < t; i++) {
            if(flag[i]) {
                System.out.println("Yes");
            }else {
                System.out.println("No");
            }
        }
    }
}
